package com.gsj.system.controller;

import com.gsj.common.pojo.R;
import com.gsj.system.config.OperLog;
import com.gsj.system.pojo.LogVo;
import com.gsj.system.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: clmseighth
 * @description: 日志controller
 * @author: 张巍蓝
 * @create: 2021-07-25 11:45
 **/

@RestController
@RequestMapping("/system/menu")
public class LogController {
    @Autowired
    private LogService logService;
    @PostMapping("queryAllLog/{currentPage}/{pageSize}")
    @OperLog( title= "查询所有日志",operatorType ="0",business_type = "0")
    public R queryAllLog(@PathVariable("currentPage")Integer currentPage,
                         @PathVariable("pageSize") Integer pageSize,
                         @RequestBody LogVo logVo
                         ){
        return logService.queryAllLog(currentPage,pageSize,logVo);

    }
    @GetMapping("deleteLogById")
    @OperLog( title= "通过id删除日志表",operatorType ="0",business_type = "0")
    public R deleteLogById(Integer id){
        return logService.deleteLogById(id);
    }

}
